







Algorithms..::CountEqual<(Of <T>)> Method (IEnumerable<(Of <T>)>, T, IEqualityComparer<(Of <T>)>) |
See Also |
![]() ![]() |
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Counts the number of items in the collection that are equal to find.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static int CountEqual<T>( IEnumerable<T> collection, T find, IEqualityComparer<T> equalityComparer ) |
Visual Basic (Declaration) |
---|
Public Shared Function CountEqual(Of T) ( _ collection As IEnumerable(Of T), _ find As T, _ equalityComparer As IEqualityComparer(Of T) _ ) As Integer |
Visual C++ |
---|
public: generic<typename T> static int CountEqual ( IEnumerable<T>^ collection, T find, IEqualityComparer<T>^ equalityComparer ) |
Parameters
- collection
- IEnumerable<(Of <T>)>
The collection to count items in.
- find
- T
The item to compare to.
- equalityComparer
- IEqualityComparer<(Of <T>)>
The comparer to use to determine if two items are equal. Only the Equals member function will be called.
Return Value
The number of items in the collection that are equal to find.
Type Parameters
- T
Exceptions
Exception | Condition |
---|---|
System..::ArgumentException | collection or equalityComparer is null. |
See Also
Algorithms Class
Wintellect.PowerCollections Namespace